package definite.Guide.Book.JOptionPane;

import java.awt.Color;

import javax.swing.Icon;
import javax.swing.JOptionPane;

import definite.Guide.Book.ToggleButton.DiamondIcon;

public class OptionPopup {

	public static void main(String[] args) {
		Icon greenIcon = new DiamondIcon(Color.GREEN);
		Icon redIcon = new DiamondIcon(Color.RED);
		Object iconArray[] = { greenIcon, redIcon };
		JOptionPane.showOptionDialog(null, "Continue Printing ?",
				"Select an option", JOptionPane.YES_NO_OPTION,
				JOptionPane.QUESTION_MESSAGE, null, iconArray, iconArray[1]);

		Icon blueIcon = new DiamondIcon(Color.BLUE);
		String stringArray[] = { "Do it", "No way" };
		JOptionPane.showOptionDialog(null, "Continue printing ?",
				"Select An Option", JOptionPane.YES_NO_OPTION,
				JOptionPane.QUESTION_MESSAGE, blueIcon, stringArray,
				stringArray[0]);

	}

}
